{ "selection", GDK_DEBUG_SELECTION, "Information about selections" },
{ "clipboard", GDK_DEBUG_CLIPBOARD, "Information about clipboards" },
{ "nograbs", GDK_DEBUG_NOGRABS, "Disable pointer and keyboard grabs (X11)" },
+ { "portals", GDK_DEBUG_PORTALS, "Force the use of portals" },
{ "gl-disable", GDK_DEBUG_GL_DISABLE, "Disable OpenGL support" },
{ "gl-software", GDK_DEBUG_GL_SOFTWARE, "Force OpenGL software rendering" },
{ "gl-texture-rect", GDK_DEBUG_GL_TEXTURE_RECT, "Use OpenGL texture rectangle extension" },
gboolean
gdk_should_use_portal (void)
{
- static const char *use_portal = NULL;
+ if (GDK_DISPLAY_DEBUG_CHECK (NULL, PORTALS))
+ return TRUE;
- if (G_UNLIKELY (use_portal == NULL))
- {
- if (gdk_running_in_sandbox ())
- use_portal = "1";
- else
- {
- use_portal = g_getenv ("GTK_USE_PORTAL");
- if (!use_portal)
- use_portal = "";
- }
- }
+ if (gdk_running_in_sandbox ())
+ return TRUE;
- return use_portal[0] == '1';
+ return FALSE;
}
PangoDirection
GDK_DEBUG_CLIPBOARD = 1 << 10,
/* flags below are influencing behavior */
GDK_DEBUG_NOGRABS = 1 << 11,
- GDK_DEBUG_GL_DISABLE = 1 << 12,
- GDK_DEBUG_GL_SOFTWARE = 1 << 13,
- GDK_DEBUG_GL_TEXTURE_RECT = 1 << 14,
- GDK_DEBUG_GL_LEGACY = 1 << 15,
- GDK_DEBUG_GL_GLES = 1 << 16,
- GDK_DEBUG_GL_DEBUG = 1 << 17,
- GDK_DEBUG_GL_EGL = 1 << 18,
- GDK_DEBUG_GL_GLX = 1 << 19,
- GDK_DEBUG_GL_WGL = 1 << 20,
- GDK_DEBUG_VULKAN_DISABLE = 1 << 21,
- GDK_DEBUG_VULKAN_VALIDATE = 1 << 22,
- GDK_DEBUG_DEFAULT_SETTINGS= 1 << 23,
- GDK_DEBUG_HIGH_DEPTH = 1 << 24,
+ GDK_DEBUG_PORTALS = 1 << 12,
+ GDK_DEBUG_GL_DISABLE = 1 << 13,
+ GDK_DEBUG_GL_SOFTWARE = 1 << 14,
+ GDK_DEBUG_GL_TEXTURE_RECT = 1 << 15,
+ GDK_DEBUG_GL_LEGACY = 1 << 16,
+ GDK_DEBUG_GL_GLES = 1 << 17,
+ GDK_DEBUG_GL_DEBUG = 1 << 18,
+ GDK_DEBUG_GL_EGL = 1 << 19,
+ GDK_DEBUG_GL_GLX = 1 << 20,
+ GDK_DEBUG_GL_WGL = 1 << 21,
+ GDK_DEBUG_VULKAN_DISABLE = 1 << 22,
+ GDK_DEBUG_VULKAN_VALIDATE = 1 << 23,
+ GDK_DEBUG_DEFAULT_SETTINGS= 1 << 24,
+ GDK_DEBUG_HIGH_DEPTH = 1 << 25,
} GdkDebugFlags;
extern guint _gdk_debug_flags;